﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Entities;
using DataAccessLayer;

namespace BusinessLogicLayer
{
    public class KhoaHocBLL
    {
        private KhoaHocDAL dal;

        public KhoaHocBLL()
        {
            try
            {
                dal = new KhoaHocDAL();
            }
            catch { throw; }
        }

        public List<KhoaHocEntity> getAll()
        {
            try
            {
                return dal.getAll();
            }
            catch { throw; }
        }

        public KhoaHocEntity getById(int _id)
        {
            try
            {
                return dal.getById(_id);
            }
            catch { throw; }
        }

        public List<KhoaHocEntity> getByLopHocId(int _id)
        {
            try
            {
                return dal.getByLopHocId(_id);
            }
            catch { throw; }
        }

        public List<KhoaHocEntity> getByHocVienId(string _id)
        {
            try
            {
                return dal.getByHocVienId(_id);
            }
            catch { throw; }
        }

        public int addKhoaHoc(KhoaHocEntity _obj)
        {
            try
            {
                return dal.addKhoaHoc(_obj);
            }
            catch { throw; }
        }

        public int deleteKhoaHoc(int _id)
        {
            try
            {
                return dal.deleteKhoaHoc(_id);
            }
            catch { throw; }
        }

        public int updateKhoaHoc(KhoaHocEntity _obj)
        {
            try
            {
                return dal.updateKhoaHoc(_obj);
            }
            catch { throw; }
        }
    }
}
